class Routes {
    login: any
    notLogin: any
    userNotLogin: any
    adminLogin: any
    validationData: any
    errMap: any
    constructor() {
        this.login = {};
        this.notLogin = {};
        this.userNotLogin = {};
        this.adminLogin = {}
        this.validationData = {};
        this.errMap = {}; //用于错误提示
    }

    setUserNotLogin(routeName, validationData, func) {
        this.userNotLogin[routeName] = func;
        this.validationData[routeName] = validationData;
    }

    setNotLogin(routeName, validationData, func) {
        this.notLogin[routeName] = func;
        this.validationData[routeName] = validationData;
    }

    setLogin(routeName, validationData, func) {
        this.login[routeName] = func;
        this.validationData[routeName] = validationData;
    }

    setAdminLogin(routeName, validationData, func) {
        this.adminLogin[routeName] = func;
        this.validationData[routeName] = validationData;
    }
}

let routes = new Routes();
export default routes;